Interactive maps with Bokeh¶
Our ultimate goal today is to learn few concepts how we can produce nice looking interactive maps using Geopandas and Bokeh such as:
Simple interactive point plot¶
First, we learn the basic logic of plotting in Bokeh by making a simple interactive plot with few points.
Import necessary functionalities from bokeh.
from bokeh.plotting import figure, save
First we need to initialize our plot by calling the figure object.
# Initialize the plot (p) and give it a title
In [1]: p = figure(title="My first interactive plot!")
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-1-872b89d81000> in <module>()
----> 1 p = figure(title="My first interactive plot!")
NameError: name 'figure' is not defined
# Let's see what it is
In [2]: p